

from utils.date import get_today
from xtquant import xtdata

def download_today_data():
	today=get_today()
	stocks = xtdata.get_stock_list_in_sector('沪深A股')
	for stock in stocks:
		xtdata.download_history_data(stock,period="tick",start_time=today,end_time=today,incrementally=True)
		print("下载:"+stock)


def download_k_line():
	stocks = xtdata.get_stock_list_in_sector('沪深A股')
	for stock in stocks:
		xtdata.download_history_data(stock,period="1d",start_time="20050101",incrementally=True)
		print("下载K线:"+stock)
   

       
	
